package org.hxyjs.dto;



/**
 * 消息的枚举 就是把所有的消息可能都列出来的
 */
//查询全部学生为例  查询成功   查询失败  当前没有数据
public enum MessageEnum {
    GETADMINSUCCESS(200,Messages.GETADMINSUCCESS),
    GETADMINFAIL(4001,Messages.GETADMINFAIL),
    ADDADMINSUCCESS(200,Messages.ADDADMINSUCCESS),
    ADDADMINFAIL(4002,Messages.ADDADMINFAIL),

    DELETEADMINSUCCESS(200,Messages.DELETEADMINSUCCESS),
    DELETEADMINFAIL(4001,Messages.DELETEADMINFAIL),
    UPDATEADMINSUCCESS(200,Messages.UPDATEADMINSUCCESS),
    UPDATEADMINFAIL(4002,Messages.UPDATEADMINFAIL),
    //管理员结束
    GETNEWSSUCCESS(200,Messages.GETNEWSSUCCESS),
    GETNEWSFAIL(4001,Messages.GETNEWSFAIL),
    ADDNEWSSUCCESS(200,Messages.ADDNEWSSUCCESS),
    ADDNEWSFAIL(4002,Messages.ADDNEWSFAIL),

    DELETENEWSSUCCESS(200,Messages.DELETENEWSSUCCESS),
    DELETENEWSFAIL(4001,Messages.DELETENEWSFAIL),
    UPDATENEWSSUCCESS(200,Messages.UPDATENEWSSUCCESS),
    UPDATENEWSFAIL(4002,Messages.UPDATENEWSFAIL);
    //新闻结束



    private Integer code;//状态码
    private String message;




    MessageEnum() {
    }

    public Integer getCode() {
        return code;
    }

    MessageEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
